﻿@using EasyUIMvc
@using EasyUIMvc.Samples.App_Start
@using EasyUIMvc.Window
@{
    ViewBag.Title = "Window";
}

<h2>Window</h2>

@Html.EasyUI().Window(settings =>
                      {
                          settings.Id = "window";
                          settings.Title = "Window Sample";
                          settings.DataOptions = "iconCls:'icon-save',modal:true";
                          settings.Style = "width:600px;height:400px;padding:5px";
                          settings.DataOptionButton = new ButtonDataOption
                                                      {
                                                          Align = "right",
                                                          Border = false,
                                                          Padding = "5px 0 0",
                                                          ButtonOption = new WindowButton
                                                                         {
                                                                             ButtonTexts = new []{"Đồng ý","Hủy bỏ"},
                                                                             ButtonIcons = new []
                                                                                           {
                                                                                               EnumHelper.GetEnumDescription(EnumHelper.IconEnum.IconOk),
                                                                                               EnumHelper.GetEnumDescription(EnumHelper.IconEnum.IconCancel)
                                                                                           },
                                                                             Hrefs = new[] { "javascript:void(0)", "javascript:void(0)" },
                                                                             OnClicks = new[] { "javascript:alert('ok')", "javascript:alert('ok')" }
                                                                         }
                                                      };

                      }).Content("ABC").GetHtml()

<button onclick="$('#window').window('open')">Kiểm tra cửa sổ</button>